import array

if __name__ == '__main__':
    numbers = array.array('h', [-2, -1, 0, 1, 2])
    memv = memoryview(numbers)      #1
    a = len(memv)
    print(a)
    a = memv[0]     #2
    print(a)
    memv_oct = memv.cast('B')   #3
    a = memv_oct.tolist()   #4
    print(a)
    memv_oct[5] = 4     #5
    print(numbers)